package com.event.streaming.config.setttings

import org.apache.spark.sql.DataFrame

trait DebugSettings {
  def debugEnabled: Boolean = false

  def debugHDFSDir : String

  def write (df:DataFrame,subDir:String):Unit = {
    if (debugEnabled) {
      df.write.format("csv").option("header","true").mode("overwrite").save("%s/%s".format(debugHDFSDir,subDir))
    }
  }

}
